home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Add-Ons / MPW / MPW fixit / fixit.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-03-02  |  1.5 KB  |  69 lines  |  [TEXT/MPS ]

  1. /* File fixit.h Copyright (C) 1996 by John R. Montbriand.  All Rights Reserved. */
  2.  
  3. #ifndef __FIXIT__
  4. #define __FIXIT__
  5.  
  6. /* File fixit.h
  7.  
  8.     Copyright (C) 1996 by John Montbriand.  All Rights Reserved.
  9.     
  10.     Distribute freely in areas where the laws of copyright apply.
  11.     
  12.     Use at your own risk.
  13.     
  14.     Do not distribute modified copies.
  15.     
  16.     These various fixmath routines and libraries are for free!
  17.     
  18.     See the file fixit.txt for details.
  19.     
  20. */
  21.  
  22. #include <Types.h>
  23. #include <FixMath.h>
  24.  
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28.  
  29.     /* some useful constants */
  30.     
  31. #define fxPI     0x0003243F  /* = 3.141592  pi */
  32. #define fxE      0x0002B7E1  /* = 2.718282  e */
  33. #define fxGOLDEN 0x00019E37  /* = 1.618034  golden ratio */
  34. #define fxRPD    0x00000478  /* = 0.017453  radians per degree */
  35. #define fxDPR    0x00394BB8  /* = 57.29578  degrees per radian */
  36.  
  37.  
  38. /* FixSqrt calculates the square root of the fixed point
  39.     number x. */
  40. Fixed FixSqrt(Fixed x);
  41.  
  42. /* FixExp calculates x to the power a where both x and
  43.     a are fixed point numbers */
  44. Fixed FixExp(Fixed x, Fixed a);
  45.  
  46. /* FixSquare calculates the square of the fixed point
  47.     number x. */
  48. Fixed FixSquare(Fixed x);
  49.  
  50. /* FixCos calculates the cosine of the fixed point
  51.     number x. x is in radians. */
  52. Fixed FixCos(Fixed x);
  53.  
  54. /* FixSin calculates the sine of the fixed point
  55.     number x. x is in radians. */
  56. Fixed FixSin(Fixed x);
  57.  
  58. /* FixTan calculates the tangent of the fixed point
  59.     number x. x is in radians. */
  60. Fixed FixTan(Fixed x);
  61.  
  62. #ifdef __cplusplus
  63. }
  64. #endif
  65.  
  66. #endif
  67.  
  68. /* end of file fixit.h */
  69.